Skip to content

Conversation

@nrspruit
Copy link
Contributor

@nrspruit nrspruit commented Feb 5, 2026

No description provided.

Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
@nrspruit nrspruit marked this pull request as ready for review February 11, 2026 17:37

# Configure git to use .githooks directory
subprocess.run(
['git', 'config', 'core.hooksPath', str(githooks_dir)],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are four levels of githooks...
--global --system --local --worktree
five if you consider the rare --blob ability (which probably not worrisome here).
The pathing , while I have no native concern, may be in conflict with a users pre-configured environment. Are we certain this stacks, or it is replacing the users existing environment, if so how is it restored?

Another thought
This I assume, is targeting only implied --local behavior since no option is provided.
However, if the user has their environment to use --global will this be ignored entirely...

Summary, is this something we want to get into, i.e. configuring for them, or simply put some docs in and leave it at that, if they wish to manage multiple hooks, folder, etc.. they probably need to copy/paste or something

To enable automatic copyright year updates and other git hooks, run:

```bash
python3 .githooks/setup.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending your thoughts on my prior comments for git config options, we may want to change this to simply give instructions for them to copy/paste the pre-commit file to someplace they have enabled... And/or change the script to simply check if hooks are enabled, inform them, and then see if the pre-commit file is in their path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants